package com.usian.admin.feign;

import com.usian.model.admin.dtos.NewsAuthDto;
import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.media.pojos.WmNews;
import com.usian.model.media.pojos.WmNewsVo;
import com.usian.model.media.pojos.WmUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "leadnews-wemedia")
@RequestMapping("/api/v1/news")
public interface WemediaFeign {

    @GetMapping("/ones/{id}")
    public WmNews findByNewsId(@PathVariable Integer id);

    @PostMapping("/updateNewStatus")
    public ResponseResult updateNewStatus(@RequestBody WmNews wmNews);

    @GetMapping("/findByUserId/{id}")
    public WmUser findByUserId(@PathVariable("id") Integer userId);

    @PostMapping("/findNews")
    public List<Integer> findNews();

    @PostMapping("/findList")
    public ResponseResult findList(@RequestBody NewsAuthDto dto);

    @GetMapping("/findNewsById/{id}")
    public WmNewsVo findNewsById(@PathVariable Integer id);


}
